package com.example.javadesign.prototype.singleton;

import lombok.Data;

import java.io.*;
import java.util.List;

/**
 * @author 陳樂
 * @version 1.0.0
 * @ClassName ConcretePrototype.java
 * @Description TODO
 * @createTime 2022年08月21日 20:30:00
 */
@Data
public class ConcretePrototype  implements Cloneable {

    private int age;

    private String name;

    private List<String> hobbies;

    private static ConcretePrototype instance = new ConcretePrototype();

    private static ConcretePrototype getInstance(){
        return instance;
    }

    @Override
    public ConcretePrototype clone() {
        return instance;
    }

}
